package com.hujf.flink.DataStreamAPI;

import org.apache.flink.api.java.ExecutionEnvironment;
import org.apache.flink.api.java.functions.KeySelector;
import org.apache.flink.api.java.operators.DataSource;
import org.apache.flink.api.java.operators.JoinOperator;
import org.apache.flink.api.java.operators.UnionOperator;


/**
 * @Author hujf
 * @Date 2022/7/11 15:26
 * @Description TODO
 */
public class Different {
    public static void main(String[] args) throws Exception {
        ExecutionEnvironment environment = org.apache.flink.api.java.ExecutionEnvironment.getExecutionEnvironment();
        DataSource<Integer> integerDataSource = environment.fromElements(1, 2, 3, 54, 5, 2, 3, 4);
        DataSource<Integer> integerDataSource2 = environment.fromElements(12, 2, 3, 54, 5, 2, 3, 41);


        UnionOperator<Integer> union = integerDataSource.union(integerDataSource2);


        union.print();
    }
}
